Method for obtaining IP address of DHCPV6 server, DHCPV6 server, and DHCPV6 communication system

ABSTRACT

The present invention relates to the field of communications, and in particular, relates to a method for obtaining an Internet Protocol (IP) address of a Dynamic Host Configuration Protocol version 6 (DHCPv6) server, a DHCPv6 server, and a DHCPv6 communication system. The method is applied in a scenario of communication through a DHCPv6 relay agent, and includes: receiving, by a DHCPv6 server, a message of a DHCPv6 client forwarded by a DHCPv6 relay agent; sending, by the DHCPv6 server, a response message to the DHCPv6 client through the DHCPv6 relay agent, in which a payload of the response message carries an IP address of the DHCPv6 server, so that the DHCPv6 client obtains the IP address of the DHCPv6 server from the response message.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2010/073187, filed on May 25, 2010, which claims priority toChinese Patent Application No. 200910107976.8, filed on Jun. 11, 2009,both of which are hereby incorporated by reference in their entireties.

FIELD OF THE INVENTION

The present invention relates to the field of communications, and inparticular to a method for obtaining an Internet Protocol (IP) addressof a Dynamic Host configuration Protocol version 6 (DHCPv6) server, aDHCPv6 server, and a DHCPv6 communication system.

BACKGROUND OF THE INVENTION

In a broadband network, if a client sends a network access request, aserver which is in the network and is responsible for IP addressallocation allocates an IP address to the client sending the networkaccess request, so that the client may access the network. At present,the servers involved in network access of the client in the broadbandnetwork are a DHCPv6 server and a DHCPv6 relay server using a standardDHCP protocol. When the client accesses the network, the client sends aDHCP request message to the DHCPv6 relay server, for applying foraccessing the network; the DHCPv6 relay server receives and forwards therequest message to the DHCPv6 server; after receiving the DHCP requestmessage of the client, the DHCPv6 server records network initializationinformation including an IP address allocated to the client and its ownIP address in a DHCP reply message, and sends the DHCP reply message tothe DHCPv6 relay server; and the DHCPv6 relay server forwards the DHCPreply message received from the DHCPv6 server to the client, so that theclient obtains the IP addresses, and accesses the network.

In the DHCPv6 protocol, when the client and the DHCPv6 server are not inthe same link, a DHCPv6 relay configuration function and a messageforwarding function can be implemented on a router, and a DHCPv6 relayagent can effectively solve the problem of address configuration, so asto enable the client to successfully apply for the IP address.

When the client sends the message to the DHCPv6 server, the IP addressof the client is not lost in a relayed process; and when the DHCPv6server returns a message to client, as the relay agent strips a messageheader of the message sent back from the DHCPv6 server in forwarding themessage sent back from the DHCPv6 server, so that the IP address of theDHCPv6 server carried in the message header is discarded. Therefore, theclient cannot know the IP address of the DHCPv6 server, so that theclient cannot perform source address authentication on the message fromthe DHCPv6 server, and the client cannot effectively protect the messagesent between the DHCPv6 server and the DHCPv6 client.

SUMMARY OF THE INVENTION

Embodiments of the present invention provide a method for obtaining anIP address of a DHCPv6 server, a DHCPv6 server, and a DHCPv6communication system, so as to solve the problem that the IP address ofthe DHCPv6 server cannot be obtained in a DHCP v6 relay manner atpresent.

In order to solve the foregoing problem, an embodiment of the presentinvention provides a method for obtaining an IP address of a DHCPv6server. The method is applied in a scenario of communication through aDHCPv6 relay agent, and includes: receiving, by a DHCPv6 server, amessage of a DHCPv6 client forwarded by a DHCPv6 relay agent; sending,by the DHCPv6 server, a response message to the DHCPv6 client throughthe DHCPv6 relay agent, in which a payload of the response messagecarries an IP address of the DHCPv6 server, so that the DHCPv6 clientobtains the IP address of the DHCPv6 server from the response message.

In order to solve the foregoing problem, an embodiment of the presentinvention provides a DHCPv6 server. The DHCPv6 server is applied in ascenario of communication through a DHCPv6 relay agent, and includes areceiving unit, configured to receive a message of a DHCPv6 clientforwarded by a DHCPv6 relay agent; and

a response unit, configured to send a response message to the DHCPv6client through the DHCPv6 relay agent, in which a payload of theresponse message carries an IP address of the DHCPv6 server, so that theDHCPv6 client obtains the IP address of the DHCPv6 server from theresponse message.

In order to solve the foregoing problem, an embodiment of the presentinvention provides a DHCPv6 communication system, which includes a DHCv6server, a DHCPv6 relay agent, and a DHCPv6 client. The DHCPv6 server isconfigured to receive a message of a DHCPv6 client forwarded by theDHCPv6 relay agent, and send a response message to the DHCPv6 clientthrough the DHCPv6 relay agent, in which a payload of the responsemessage carries an IP address of the DHCPv6 server, so that the DHCPv6client obtains the IP address of the DHCPv6 server from the responsemessage.

Optionally, the IP address of the DHCPv6 server is a CryptographicallyGenerated Address (CGA) of the DHCPv6 server.

In the method for obtaining the IP address of the DHCPv6 server, theDHCPv6 server, and the DHCPv6 communication system according to theembodiments of the present invention, the IP address of the DHCPv6server is carried in the payload of the DHCPv6 message sent by theDHCPv6 server to the DHCPv6 client by extending the message, so that theDHCPv6 relay agent strips only the message header of the message sent bythe DHCPv6 server, rather than the IP address of the DHCPv6 servercarried in the payload of the message sent by the DHCPv6 server, whenthe DHCPv6 server communicates with the DHCPv6 client through the DHCPv6relay agent, so that the DHCPv6 client can obtain the IP address of theDHCPv6 server from the message sent by the DHCPv6 server and forwardedby the DHCPv6 relay agent.

In addition, when the DHCPv6 server uses the CGA, the message sentbetween the DHCPv6 server and the DHCPv6 client can be effectivelyprotected.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is schematic flow chart of a method for obtaining an IP addressof a DHCPv6 server according to Embodiment 1 of the present invention;

FIG. 2 is a schematic view of a format of a server identifiers optionaccording to an embodiment of the present invention;

FIG. 3 is a schematic flow chart of a method for obtaining an IP addressof a DHCPv6 server according to Embodiment 2 of the present invention;

FIG. 4 is a schematic view of a format of a DHCPv6 server IP optionaccording to an embodiment of the present invention;

FIG. 5 is a schematic structural view of a DHCPv6 server according to anembodiment of the present invention; and

FIGS. 6 and 7 are schematic structural views of a DHCPv6 communicationsystem according to an embodiment of the present invention.

DETAILED DESCRIPTION OF THE EMBODIMENTS

Processes for implementing embodiments of the present invention aredescribed below with reference to the accompanying drawings.

In an embodiment of the present invention, an IP address of a DHCPv6server is carried in a payload of a DHCPv6 message sent by the DHCPv6server to a DHCPv6 client by extending the message, so that a DHCPv6relay agent strips only a message header of the message sent by theDHCPv6 server, rather than the IP address of the DHCPv6 server carriedin the payload of the message sent by the DHCPv6 server, when the DHCPv6server communicates with the DHCPv6 client through the DHCPv6 relayagent, so that the DHCPv6 client can obtain the IP address of the DHCPv6server from the message sent by the DHCPv6 server and forwarded by theDHCPv6 relay agent.

For example, the DHCPv6 server receives a message of the DHCPv6 clientforwarded by the DHCPv6 relay agent; and the DHCPv6 server sends aresponse message to the DHCPv6 client through the DHCPv6 relay agent, inwhich the payload of the response message carries the IP address of theDHCPv6 server, so that the DHCPv6 client obtains the IP address of theDHCPv6 server from the response message.

In the forgoing example, the message of the DHCPv6 client may be any oneof the following: a solicit message, a request message, a renew message,a rebind message, an information-request message, a confirm message, arelease message, and a decline message. The response message may be anyone of the following: an advertise message, a reply message, arelay-reply message, and a reconfigure Message. Hereinafter,descriptions are made respectively.

In the DHCPv6 protocol, both the DHCPv6 client and the DHCPv6 serverhave a DHCP Unique Identifier (DUID). The DHCPv6 server identifies theDHCPv6 client sending the request according to the DUID of the DHCPv6client, and the DHCPv6 client identifies the DHCPv6 server according tothe DUID of the DHCPv6 server.

In an embodiment of the present invention, the IP address of the DHCPv6server is carried in a DUID field by extending DUID types in somemessages sent by the DHCPv6 server to the DHCPv6 client through theDHCPv6 relay agent, so that the message arrived at the DHCPv6 clientthrough the DHCPv6 relay agent still carries the IP address of theDHCPv6 server, and therefore the DHCPv6 client can obtain the IP addressof the DHCPv6 server, which is applied in a scenario of CGA.

As shown in FIG. 1, a method for obtaining an IP address of a DHCPv6server according to Embodiment 1 of the present invention includes thefollowing steps.

In step S11, a DHCPv6 server receives a solicit message of a DHCPv6client forwarded by a DHCPv6 relay agent, in which the solicit messageis sent by the DHCPv6 client to the DHCPv6 relay agent for finding theDHCPv6 server.

Optionally, the solicit message may carry a client identifier option ofthe DHCPv6 client.

In step S12, the DHCPv6 server sends an advertise message to the DHCPv6client through the DHCPv6 relay agent, so as to indicate that DHCPservices are available, in which a payload of the advertise messagecarries an IP address of the DHCPv6 server.

The advertise message includes a server identifiers option of the DHCPv6server, in which the format of the server identifiers option is as shownin FIG. 2, and includes an OPTION_SERVERID field, an option-len field,and a DUID field, in which the DUID field is a field with variablelength, and used to identify the DHCPv6 server. Existing DUID typesinclude link-layer address plus time, vendor-assigned unique ID based onEnterprise Number, and link-layer address.

Optionally, in an embodiment of the present invention, a new DUID typemay be added in the original DUID field of the server identifiersoption, in which the newly added DUID type is used to represent the IPaddress of the DHCPv6 server or other identifier information of theDHCPv6 server.

Optionally, a period of validity of the IP address of the DHCPv6 servermay be further carried in the newly defined DUID type, and definitely,the period of validity of the IP address of the DHCPv6 server may alsobe carried in other fields of the payload of the advertise message.

Optionally, if the solicit message carries the client identifier optionof the DHCPv6 client, the advertise message further carries the clientidentifier option of the DHCPv6 client.

In step S13, the DHCPv6 client receives the advertise message sent bythe DHCPv6 server through the DHCPv6 relay agent, so as to obtain the IPaddress of the DHCPv6 server.

Definitely, a person of ordinary skill in the art may know through theforgoing example that, the same effect may also be achieved by carryingthe IP address of the DHCPv6 server in other fields of the payload ofthe advertise message.

As shown in FIG. 3, a method for obtaining an IP address of a DHCPv6server according to Embodiment 2 of the present invention includes:

Step S31: A DHCPv6 server receives a request message of a DHCPv6 clientforwarded by a DHCPv6 relay agent, in which the request message is sentby a certain DHCPv6 client, so as to request a configuration parameterfrom the DHCPv6 server, and the configuration parameter may be an IPaddress, that is, the DHCPv6 client requests the DHCPv6 server toallocate an IP address to the DHCPv6 client; and definitely, theconfiguration parameter may be other configuration parameters other thanIP address.

Step S32: The DHCPv6 server sends a reply message to the DHCPv6 clientthrough the DHCPv6 relay agent, in which a payload of the reply messagecarries an IP address of the DHCPv6 server.

The reply message includes a server identifiers option of the DHCPv6server, in which a format of the server identifiers option is as shownin FIG. 2, and includes an OPTION_SERVERID field, an option-len field,and a DUID field, in which the DUID field is a field with variablelength, and used to identify the DHCPv6 server. Existing DUID typesinclude link-layer address plus time, vendor-assigned unique ID based onEnterprise Number, and link-layer address.

Optionally, in an embodiment of the present invention, a new DUID typemay be added in the original DUID field of the server identifiersoption, in which the newly added DUID type is used to represent the IPaddress of the DHCPv6 server or other identifier information of theDHCPv6 server.

Optionally, a period of validity of the IP address of the DHCPv6 servermay be further carried in the newly defined DUID type, and definitely,the period of validity of the IP address of the DHCPv6 server may alsobe carried in other fields of the payload of the advertise message.

Step S33: The DHCPv6 client receives the reply message sent by theDHCPv6 server through the DHCPv6 relay agent, so as to obtain the IPaddress of the DHCPv6 server.

Definitely, a person of ordinary skill in the art may know through theforgoing example that, the same effect may also be achieved by carryingthe IP address of the DHCPv6 server in other fields of the payload ofthe reply message.

The DHCPv6 client, which obtains the IP address and/or otherconfiguration parameters in the manner in the embodiment, may send arenew message to the DHCPv6 server through the DHCPv6 relay agent, so asto request the DHCPv6 server to prolong a life-span of the IP address ofthe DHCPv6 client and/or renew other configuration parameters, in whichthe renew message carries the server identifiers option of the DHCPv6server previously received by the DHCPv6 client, and the serveridentifiers option includes the DUID field carrying the IP address ofthe DHCPv6 server. If the DHCPv6 client does not receive an answer tothe renew message from the DHCPv6 server, the DHCPv6 client may furthersend a rebind message to the DHCPv6 server, so as to prolong thelife-span of the IP address of the DHCPv6 client and/or renew otherconfiguration parameters. The rebind message carries the serveridentifiers option of the DHCPv6 server previously received by theDHCPv6 client, and the server identifiers option includes the DUID fieldcarrying the IP address of the DHCPv6 server.

The DHCPv6 server may send a reply message including the IP address andthe configuration parameters, so as to answer the received request,renew, and rebind messages sent by the DHCPv6 client; the DHCPv6 servermay also send a reply message including the configuration parameters, soas to answer an information-request message; and the DHCPv6 server maysend a reply message to answer a confirm message and confirm the addressallocated to the client, deny the address allocated to the client, admitthe receiving of a release message, or admit the receiving of a declinemessage. The reply message carries the server identifiers option of theDHCPv6 server, and the server identifiers option includes the DUID fieldcarrying the IP address of the DHCPv6 server.

In addition, when the DHCPv6 client sends a release message to theDHCPv6 server, so as to indicate that the DHCPv6 client does not use theIP address allocated by the DHCPv6 server, the release message furthercarries the server identifiers option of the DHCPv6 server previouslyreceived by the DHCPv6 client, and the server identifiers optionincludes the DUID field carrying the IP address of the DHCPv6 server.

When the DHCPv6 client sends a decline message to the DHCPv6 server, soas to indicate that the IP address allocated by the DHCPv6 server hasbeen used by other nodes in a link, the decline message further carriesthe server identifiers option of the DHCPv6 server previously receivedby the DHCPv6 client, and the server identifiers option includes theDUID field carrying the IP address of the DHCPv6 server.

When the DHCPv6 server sends a reconfigure message, so as to notify theDHCPv6 client that the DHCPv6 server has a new or a latest configurationparameter, and allow the DHCPv6 client to initiate a renew/reply or aninformation-request/reply processing, so as to receive the new or thelatest configuration parameter of the DHCPv6 server. The reconfiguremessage also carries the server identifiers option of the DHCPv6 serverpreviously received by the DHCPv6 client, and the server identifiersoption includes the DUID field carrying the IP address of the DHCPv6server.

If the DHCPv6 client has obtained an address allocated by a certainDHCPv6 server to the DHCPv6 client, when the DHCPv6 client sends aninformation-request message to the DHCPv6 server, so as to request aconfiguration parameter other than the IP address, theinformation-request message further carries the server identifiersoption of the DHCPv6 server previously received by the DHCPv6 client,and the server identifiers option includes the DUID field carrying theIP address of the DHCPv6 server.

In Embodiments 1 and 2, the DHCPv6 server carries its own IP address inthe DUID field of the server identifiers option, and the serveridentifiers option is not stripped by the DHCPv6 relay agent in aprocess of being forwarded by the DHCPv6 relay agent to the DHCPv6client, so that the DHCPv6 client can obtain the IP address of theDHCPv6 server. When the DHCPv6 server uses the CGA address, the messagesent between the DHCPv6 server and the DHCPv6 client can be effectivelyprotected.

In a method for obtaining an IP address of a DHCPv6 server according toEmbodiment 3 of the present invention, similar to the foregoingembodiments, a DHCPv6 server carries its own IP address in a payload ofa relay-reply message sent by the DHCPv6 server to a DHCPv6 relay agent.The relay-reply message is sent to the DHCPv6 relay agent, and thenforwarded to a DHCPv6 client by the DHCPv6 relay agent, and the DHCPv6client processes the received relay-reply message, thereby obtaining theIP address of the DHCPv6 server.

For example, when the DHCPv6 server sends a reply message with anallocated IP address to the DHCPv6 client through the DHCPv6 relayagent, a relay-reply message is sent to the DHCPv6 relay agent, in whichthe DHCPv6 server relay-reply message includes a newly defined DHCPv6server IP option, and a format of the newly defined DHCPv6 server IPoption is as shown in FIG. 4. The newly defined DHCPv6 server IP optionincludes a server IP address field, an OPTION_SERVERIP field, and anoption-len field, in which the server IP address field is used to carrythe IP address of the DHCPv6 server, the OPTION_SERVERIP field may beused to carry other relevant information of the IP address of the DHCPv6server, for example, a period of validity of the IP address of theDHCPv6 server, and definitely, the period of validity of the IP addressof the DHCPv6 server may also be carried in other fields of the payloadof the relay-reply message.

Definitely, a person of ordinary skill in the art may know through theembodiment that, the same effect may also be achieved by carrying the IPaddress of the DHCPv6 server in other fields of the payload of therelay-reply message.

After receiving the relay-reply message sent by the DHCPv6 server, theDHCPv6 relay agent processes the relay-reply message, strips a messageheader of the relay-reply message, and forwards the relay-reply messageto the DHCPv6 client according to the address of the DHCPv6 clientcarried in the relay-reply message.

As the DHCPv6 relay agent strips only the message header of therelay-reply message in parsing the relay-reply message and the IPaddress of the DHCPv6 server is carried in the payload of therelay-reply message, the IP address of the DHCPv6 server is retained andfinally sent to the DHCPv6 client. Therefore, the DHCPv6 client canobtain the IP address of the DHCPv6 server, and the message sent betweenthe DHCPv6 server and the DHCPv6 client can be effectively protectedwhen the DHCPv6 server uses a CGA address.

An embodiment of the present invention further provides a DHCPv6 server,which is applied in a scenario of communication through a DHCPv6 relayagent, and includes a receiving unit 51 and a response unit 52, as shownin FIG. 5.

The receiving unit 51 is configured to receive a message of a DHCPv6client forwarded by a DHCPv6 relay agent.

The response unit 52 is configured to send a response message to theDHCPv6 client through the DHCPv6 relay agent, in which a payload of theresponse message carries an IP address of the DHCPv6 server, so that theDHCPv6 client obtains the IP address of the DHCPv6 server from theresponse message.

Optionally, when the response message is an advertise message or a replymessage, the IP address of the DHCPv6 server is carried in a payload ofthe advertise message or the reply message. For example, a new DUID typeis added in a DUID field of a server identifiers option of the advertisemessage or the reply message, and the newly added DUID type is used torepresent the IP address of the DHCPv6 server or other identifierinformation of the DHCPv6 server. Definitely, a period of validity ofthe IP address of the DHCPv6 server may also be carried in the newlyadded DUID type, and definitely, the period of validity of the IPaddress of the DHCPv6 server may also be carried in other fields of thepayload of the advertise message or the reply message.

Definitely, a person of ordinary skill in the art may know through theforgoing specific example that, the same effect may also be achieved bycarrying the IP address of the DHCPv6 server in other fields of thepayload of the advertise message or the reply message.

Optionally, when the response message is a relay-reply message, the IPaddress of the DHCPv6 server is carried in a payload of the relay-replymessage sent by the response unit to the DHCPv6 relay agent. Therelay-reply message is sent to the DHCPv6 relay agent, and thenforwarded to the DHCPv6 client by the DHCPv6 relay agent, and the DHCPv6client processes the received relay-reply message, thereby obtaining theIP address of the DHCPv6 server. Definitely, a person of ordinary skillin the art may know through the forgoing specific example that, the sameeffect may also be achieved by carrying the IP address of the DHCPv6server in other fields of the payload of the relay-reply message. AnOPTION_SERVERIP field of the relay-reply message may be used to carryother relevant information of the IP address of the DHCPv6 server, forexample, the period of validity of the IP address of the DHCPv6 server,and definitely, the period of validity of the IP address of the DHCPv6server may also be carried in other fields of the payload of therelay-reply message.

In the forgoing embodiment of the present invention, as the DHCPv6 relayagent strips only a message header of the response message in parsingthe response message sent by the DHCPv6 server and the IP address of theDHCPv6 server is carried in the payload of the response message, the IPaddress of the DHCPv6 server is retained and finally sent to the DHCPv6client, after being processed by the DHCPv6 relay agent. Therefore, theDHCPv6 client can obtain the IP address of the DHCPv6 server, and themessage sent between the DHCPv6 server and the DHCPv6 client can beeffectively protected when the DHCPv6 server uses a CGA address.

In the forgoing embodiment of the present invention, the IP address ofthe DHCPv6 server may be an IPv6 address of the DHCPv6 server, andparticularly, the IP address of the DHCPv6 server may be the CGA addressof the DHCPv6 server.

An embodiment of the present invention further provides a DHCPv6communication system, which includes a DHCv6 server 61, a DHCPv6 relayagent 62, and a DHCPv6 client 63, as shown in FIG. 6.

The DHCPv6 server 61 is configured to receive a request message of theDHCPv6 client 63 forwarded by the DHCPv6 relay agent 62, and send aresponse message to the DHCPv6 client 63 through the DHCPv6 relay agent62, in which a payload of the response message carries an IP address ofthe DHCPv6 server.

The DHCPv6 relay agent 62 is located between the DHCv6 server 61 and theDHCPv6 client 63, so that the DHCv6 server 61 can communicate with theDHCPv6 client 63 through the DHCPv6 relay agent 62.

The DHCP client 63 is configured to send the request message to theDHCPv6 server 61 through the DHCPv6 relay agent 62.

Optionally, the DHCP client 63 is further configured to receive theresponse message sent by the DHCPv6 server 61 through the DHCPv6 relayagent 62, and obtain the IP address of the DHCPv6 server 61 from theresponse message.

Optionally, as shown in FIG. 7, the DHCPv6 server 61 may include areceiving unit 611 and a response unit 612.

The receiving unit 611 is configured to receive the request message ofthe DHCPv6 client 63 forwarded by the DHCPv6 relay agent 62.

The response unit 612 is configured to send the response message to theDHCPv6 client 63 through the DHCPv6 relay agent 62, in which the payloadof the response message carries the IP address of the DHCPv6 server 61,so that the DHCPv6 client 63 obtains the IP address of the DHCPv6 server61 from the response message.

Optionally, when the response message is an advertise message or a replymessage, the IP address of the DHCPv6 server is carried in a payload ofthe advertise message or the reply message. For example, a new DUID typeis added in a DUID field of a server identifiers option of the advertisemessage or the reply message, and the newly added DUID type is used torepresent the IP address of the DHCPv6 server or other identifierinformation of the DHCPv6 server. For example, a period of validity ofthe IP address of the DHCPv6 server may also be carried in the newlyadded DUID type, and definitely, the period of validity of the IPaddress of the DHCPv6 server may also be carried in other fields of thepayload of the advertise message or the reply message.

Definitely, a person of ordinary skill in the art may know through theembodiment that, the same effect may also be achieved by carrying the IPaddress of the DHCPv6 server in other fields of the payload of theadvertise message or the reply message.

Optionally, when the response message is a relay-reply message, the IPaddress of the DHCPv6 server is carried in a payload of the relay-replymessage sent by the response unit to the DHCPv6 relay agent. Therelay-reply message is sent to the DHCPv6 relay agent, and thenforwarded to the DHCPv6 client by the DHCPv6 relay agent, and the DHCPv6client processes the received relay-reply message, thereby obtaining theIP address of the DHCPv6 server. Definitely, a person of ordinary skillin the art may know through the embodiment that, the same effect mayalso be achieved by carrying the IP address of the DHCPv6 server inother fields of the payload of the relay-reply message. AnOPTION_SERVERIP field of the relay-reply message may be used to carryother relevant information of the IP address of the DHCPv6 server, forexample, the period of validity of the IP address of the DHCPv6 server,and definitely, the period of validity of the IP address of the DHCPv6server may also be carried in other fields of the payload of therelay-reply message.

In the forgoing embodiment of the present invention, as the DHCPv6 relayagent strips only a message header of the response message in parsingthe response message sent by the DHCPv6 server and the IP address of theDHCPv6 server is carried in the payload of the response message, the IPaddress of the DHCPv6 server is retained and finally sent to the DHCPv6client, after being processed by the DHCPv6 relay agent. Therefore, theDHCPv6 client can obtain the IP address of the DHCPv6 server, and themessage sent between the DHCPv6 server and the DHCPv6 client can beeffectively protected when the DHCPv6 server uses a CGA address.

In the forgoing embodiment of the present invention, the IP address ofthe DHCPv6 server may be an IPv6 address of the DHCPv6 server, andparticularly, the IP address of the DHCPv6 server may be the CGA addressof the DHCPv6 server. In addition, one or more DHCPv6 relay agents mayexist.

Through the forgoing description of the implementation, it is clear to aperson skilled in the art that the present invention may be accomplishedthrough software plus a necessary universal hardware platform, orthrough hardware, with the former being preferred in most cases. Basedon this understanding, the forgoing technical solution or the part thatmakes contributions to the prior art can be substantially embodied inthe form of a software product. The computer software product may bestored in a storage medium, and contain several instructions to instructcomputer equipment (for example, a personal computer, a server, ornetwork equipment) to perform the method described in the embodiments ofthe present invention.

Some exemplary embodiments of the present invention are described, butare not intended to limit the protection scope of the present invention.Various variations and modifications easily made by a person skilled inthe art without departing from the spirit of the present invention fallwithin the scope of the present invention as defined by the appendedclaims. Therefore, the protection scope of the present invention issubject to the protection scope defined in the claims.

What is claimed is:
 1. A method for obtaining an Internet Protocol (IP)address identifying a Dynamic Host Configuration Protocol version 6(DHCPv6) server, wherein the DHCPv6 server and a DHCPv6 client are indifferent links and transmit DHCPv6 messages through a DHCPv6 relayagent, and the method comprises: receiving, by the DHCPv6 server, aDHCPv6 message sent by the DHCPv6 client and forwarded by the DHCPv6relay agent, where the DHCPv6 server, the DHCPv6 client and the DHCPv6relay agent are configured to run the DHCPv6; and sending, by the DHCPv6server, a DHCPv6 response message to the DHCPv6 client through theDHCPv6 relay agent, wherein the DHCPv6 response message is used torespond to the DHCPv6 message sent by the DHCPv6 client, and an IPaddress identifying the DHCPv6 server is carried in a DHCP uniqueidentifier (DUID) field of a server identifiers option of a payload ofthe DHCPv6 response message to avoid the IP address identifying theDHCPv6 server being stripped by the DHCPv6 relay agent when the DHCPv6relay agent forwards the DHCPv6 response message to the DHCPv6 client.2. The method according to claim 1, wherein the DHCPv6 response messagecomprises one of an advertise message, a reply message, a relay-replymessage and a reconfigure message.
 3. The method according to claim 1,wherein the DUID field comprises a new DUID type, the new DUID typecarrying the IP address identifying the DHCPv6 server.
 4. The methodaccording to claim 1, wherein the payload of the DHCPv6 response messagecarries a period of validity of the IP address identifying the DHCPv6server.
 5. The method according to claim 2, wherein the payload of theDHCPv6 response message carries a period of validity of the IP addressidentifying the DHCPv6 server.
 6. The method according to claim 3,wherein the payload of the DHCPv6 response message carries a period ofvalidity of the IP address identifying the DHCPv6 server.
 7. The methodaccording to claim 1, wherein the IP address identifying the DHCPv6server is a Cryptographically Generated Address (CGA) identifying theDHCPv6 server.
 8. A Dynamic Host Configuration Protocol version 6(DHCPv6) server, wherein the DHCPv6 server and a DHCPv6 client are indifferent links and transmit DHCPv6 messages through a DHCPv6 relayagent, and the DHCPv6 server comprises: a receiving unit, configured toreceive a DHCPv6 message sent by the DHCPv6 client forwarded by a DHCPv6relay agent, where the DHCPv6 server, the DHCPv6 client and the DHCPv6relay agent are configured to run the DHCPv6; and a response unit,configured to send a DHCPv6 response message to the DHCPv6 clientthrough the DHCPv6 relay agent, wherein the DHCPv6 response message isused to respond to the DHCPv6 message sent by the DHCPv6 client, and anInternet Protocol (IP) address identifying the DHCPv6 server is carriedin a DHCP unique identifier (DUID) field of a server identifiers optionof a payload of the DHCPv6 response message to avoid the IP addressidentifying the DHCPv6 server being stripped by the DHCPv6 relay agentwhen the DHCPv6 response message is forwarded to by the DHCPv6 relayagent to the DHCPv6 client.
 9. The DHCPv6 server according to claim 8,wherein the payload of the DHCPv6 response message carries a period ofvalidity of the IP address identifying the DHCPv6 server.
 10. The DHCPv6server according to claim 8, wherein the IP address identifying theDHCPv6 server is a Cryptographically Generated Address (CGA) identifyingthe DHCPv6 server.
 11. A Dynamic Host Configuration Protocol version 6(DHCPv6) communication system, comprising a DHCv6 server, a DHCPv6 relayagent, and a DHCPv6 client, wherein the DHCPv6 server and a DHCPv6client are in different links and transmit a DHCPv6 message through aDHCPv6 relay agent, and the DHCPv6 server, the DHCPv6 client and theDHCPv6 relay agent are configured to run the DHCPv6, the DHCPv6 serveris configured to receive a DHCPv6 message sent by the DHCPv6 client andrelayed by the DHCPv6 relay agent, and send a DHCPv6 response message tothe DHCPv6 client through the DHCPv6 relay agent, wherein the DHCPv6response message is used to respond to the DHCPv6 message sent by theDHCPv6 client and an Internet Protocol (IP) address identifying theDHCPv6 server is carried in a DHCP unique identifier (DUID) field of aserver identifiers option of a payload of the response message to avoidthe IP address identifying the DHCPv6 server is stripped by the DHCPv6relay agent when the DHCPv6 response message is forwarded to by theDHCPv6 relay agent to the DHCPv6 client.
 12. The DHCPv6 communicationsystem according to claim 11, wherein the payload of the DHCPv6 responsemessage carries a period of validity identifying the IP address of theDHCPv6 server.
 13. The DHCPv6 communication system according to claim11, wherein the IP address identifying the DHCPv6 server is aCryptographically Generated Address (CGA) identifying the DHCPv6 server.14. The DHCPv6 communication system according to claim 12, wherein theIP address identifying the DHCPv6 server is a CryptographicallyGenerated Address (CGA) identifying the DHCPv6 server.
 15. The DHCPv6communication system according to claim 11, wherein the DHCPv6 client isfurther configured to receive the response message sent by the DHCPv6server through the DHCPv6 relay agent, and obtain the IP addressidentifying the DHCPv6 server from the response message.